Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms

Public Partial Class Form1
	Inherits Form
	Public Sub New()
		InitializeComponent()
	End Sub

	Private Sub exitToolStripMenuItem_Click(sender As Object, e As EventArgs)
		Close()
	End Sub

	Private Sub openToolStripMenuItem_Click(sender As Object, e As EventArgs)
		openFileDialog1.Multiselect = True
		If openFileDialog1.ShowDialog() = DialogResult.OK Then
            For Each file As String In openFileDialog1.FileNames
                Try
                    Dim DBF_DT As DbfDotNet.DBFDataTable = New DbfDotNet.DBFDataTable(file, DbfDotNet.DbfVersion.dBaseIV)
                    DBF_DT.Fill()
                    '
                    Dim ThisDBFForm As New NewDBFForm(DBF_DT)
                    ThisDBFForm.MdiParent = Me
                    ThisDBFForm.Show()

                    'Dim dbfTable As DbfDotNet.DbfTable = New DbfDotNet.DbfTable(file, System.Text.Encoding.ASCII, DbfDotNet.DbfVersion.dBaseIV)
                    'dbfFile.Columns()


                    'Dim f As DbfForm = New DbfForm(file, DbfDotNet.DbfVersion.dBaseIV)
                    'f.DbfTable = dbfTable
                    'f.MdiParent = Me

                    'f.Show()
                    'f.PopulateListView()
                Catch ex As Exception
                    MessageBox.Show(ex.Message)
                End Try
            Next
		End If
	End Sub
End Class
